<?xml version="1.0" encoding="utf-8"?>
<Content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:blueonionsoftware-com:bloget:runtime:data">
  <text>&lt;font size=2&gt;

&lt;p&gt;by Adam Marks&lt;/p&gt;
&lt;p&gt;This is up for peer review, but I'm convinced that I have solved one aspect of the .NET painting problems we have been seeing.&lt;/p&gt;
&lt;p&gt;The .net Toolbar painting mostly behaves when this fix is implemented.&lt;/p&gt;
&lt;p&gt;The fix was to add the WS_CLIPSIBLINGS style to our Win32ComponentContainer window style. WS_CLIPCHILDREN was already there.&lt;/p&gt;
&lt;p&gt;When we are reparenting a .net form, we are usually re-parenting to a Win32ComponentContainer.&lt;/p&gt;

&lt;p&gt;In the .net Toolbar case, the toolbar is a sibling to the Win32ImageTheater's that are on-screen, and WS_CLIPSIBLINGS applied to the parent(s) of both forces a clipped repaint of overlapping siblings when a paint is done, which is exactly what we want. &lt;/p&gt;
&lt;p&gt;If you have bug(s) related to .net painting problems, it might be worthwhile to update Lookwin32controlcppWin32ComponentContainer.cpp and see if they are fixed.&lt;/p&gt;
&lt;p&gt;I have not added the WS_CLIPSIBLINGS style to any of our other top-level containers( Examples: Win32WorkstationWindow and Win32DisplayArea ), but be aware if you are seeing painting problems, this might be an option. &lt;/p&gt;
&lt;p&gt;If you start seeing wierd behaviors with painting in KinetDx because of this, let me know.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Adam&lt;/p&gt;
&lt;p&gt;Here are the definitions of the two styles:&lt;/p&gt;&lt;/font&gt;&lt;b&gt;&lt;font face="Times New Roman"&gt;
&lt;p&gt;WS_CLIPCHILDREN&lt;/b&gt; &lt;/p&gt;

&lt;dir&gt;
&lt;p&gt;Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window. &lt;/p&gt;&lt;/dir&gt;&lt;b&gt;
&lt;p&gt;WS_CLIPSIBLINGS&lt;/b&gt; &lt;/p&gt;
&lt;dir&gt;
&lt;p&gt;Clips child windows relative to each other; that is, when a particular child window receives a &lt;/font&gt;&lt;u&gt;&lt;font face="Times New Roman" color=#0000ff&gt;WM_PAINT &lt;/u&gt;&lt;/font&gt;&lt;font face="Times New Roman"&gt;message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.&lt;/p&gt;&lt;/dir&gt;&lt;/font&gt;&lt;img src ="http://flounder_aaeng/blogs/devnotes/aggbug/224.aspx" width = "1" height = "1" /&gt;</text>
  <last_update>2007-10-04T00:43:24.8900806Z</last_update>
  <source_title />
  <source_link />
  <comments />
  <references />
  <attachments />
</Content>